Application

These primitives manage various interface aspects of the programmer’s application, specifically menus, windows, window items, and mouse clicks. 

_________________________________________________
                                                                      draw-style-text
 *256*

Input types: string; handle; integer; boolean; rectangle; point

Description: Draws styled text in a bounding rectangle. ScrollPoint indicates how far the text is scrolled.

_________________________________________________

                                                                    find-item
 *256*

Input types: Window | Menu ;  string  |  integer

Output types: integer | string ;  Window item | Menu item

Description:  If ItemName is given, searches attribute item list of aWindow or aMenu for the first «Window Item» or «Menu Item» whose name matches ItemName.  Returns FoundIndex and FoundItem, or 0 and NULL if the item is not found.  If ItemIndex (position within item list) is given, returns FoundName and FoundItem.

Example:

 
See also:  find-menu, find-menu-a, find-window, find-window-a

_________________________________________________
                                                                               find-menu
 *257*

Input types: Application;  string  |  integer

Output types: integer | string ;  Menu | null

Description: 
If MenuName is given, searches attribute menu lib of anApplication for the first «Menu» with name MenuName. Returns FoundIndex and FoundMenu, or 0 and NULL if the menu is not found. If MenuIndex (position within menu lib) is given, returns FoundName and FoundMenu. 

See also:
find-menu-a, find-window, find-window-a, find-item

_________________________________________________
 
                                                                               find-menu-a
*257*

Input types: Application;  string  |  integer

Output types: integer | string ;  Menu | null

Description: 
If MenuName is given, searches attribute menus of anApplication for the first «Menu» with name MenuName. Returns FoundIndex and FoundMenu, or 0 and NULL if the menu is not found. If MenuIndex (position within menu) is given, returns FoundName and FoundMenu. 

See also:  find-menu, find-window, find-window-a, find-item

_________________________________________________
 
                                                                 find-window
*258*

Input types: Application;  string  |  integer

Output types: integer | string ;  Window | null

Description: 
If WindowName is given, searches attribute window lib of anApplication for the first «Window» with name WindowName. Returns FoundIndex and FoundWindow, or 0 and NULL if the window is not found. If WindowIndex (position within window lib) is given, returns FoundName and FoundWindow. 

See also:  find-window-a, find-menu, find-menu-a, find-item

_________________________________________________
 
                                                                                      find-window-a
*258*

Input types: Application;  string  |  integer

Output types: integer | string ;  Window | null

Description: 
If WindowName is given, searches attribute windows of anApplication for the first «Window» with name WindowName. Returns FoundIndex and FoundWindow, or 0 and NULL if the window is not found. If WindowIndex (position within window) is given, returns FoundName and FoundWindow. 

See also:  find-window, find-menu, find-menu-a, find-item

_________________________________________________
                                             is-double?
 *258*

Input names: Event

Input types: EventRecord

Output names: [Result]

Output types: [boolean]

Description: 
Result is TRUE if and only if Event is a click occurring within double-click time of the previous click.

_________________________________________________
                                             is-drag?
 *259*

Input names: Event

Input types: EventRecord

Output names: [Result]

Output types: [boolean]

Description: 
Result is TRUE if and only if Event is a click, the mouse is still down, and the current cursor position is different from that recorded in Event.

_________________________________________________
                                                                                       popup-menu
*259*

Input types: list; integer; point; integer; integer; boolean

Output type: list

Description: Displays a popup menu using the current font and color. MenuList contains the menu title and item strings. Nested lists form hierarchical menus. MenuID is an integer between 256 and 512. The item Selection is marked with the Mark character. SelectionList will contain the number of the selected item or a list of item numbers for hierarchical menus.

_________________________________________________
                                            wait-double?
*259*

Input names: Event

Input types: EventRecord

Output names: [Result]

Output types: [boolean]

Description: 
Result is TRUE if and only if Event is a click and another click occurs within double-click time of it.